Recording/reproducing apparatus

ABSTRACT

An independent internal buffer area is provided for each of plural kinds of accesses to a hard disk, and each internal buffer is used for the corresponding access, whereby that access by a processor and access by a video processing unit share an internal buffer is avoided, and the continuity of the accesses to the hard disk for recording and reproduction can be secured. Further, since an internal buffer to be used is specified for each access to a file, the processor can randomly access a file in which video data has already been recorded or a file in which video data is being recorded.

TECHNICAL FIELD

The present invention relates to a recording and reproduction apparatusfor recording data on a hard disk, or reproducing and editing data onthe hard disk and, more particularly, to a recording and reproductionapparatus having a file system for controlling recording andreproduction to a hard disk.

BACKGROUND OF THE INVENTION

In recent years, there has been developed a recording and reproductionapparatus for recording and reproducing a high-bit-rate and continuousdigital signal, such as a video signal, besides burst data whosefundamental size is small, such as a document or the like.

The above-mentioned recording and reproduction apparatus comprises aprocessor for controlling the operation of the entire apparatus, a mainmemory as a work recording unit for the processor, a hard disk as asecondary recording unit, a file system for executing data transferbetween the main memory and the hard disk, and a video processing unitfor terminating a video input and restoring a video output. Therecording and reproduction apparatus records digital video on the harddisk, reproduces the digital video from the hard disk and, further,performs editing of the digital video recorded on the hard disk.

Further, ordinary data and video data exist in the hard disk of therecording and reproduction apparatus. The ordinary data is data to beprocessed by the processor, and it has the burst transfercharacteristics. On the other hand, the video data is data to beprocessed by the video processing unit, and it has the continuoustransfer characteristics.

Hereinafter, the conventional recording and reproduction apparatus willbe described taking examples.

PRIOR ART 1

FIG. 2 is a block diagram illustrating a recording and reproductionapparatus according to Prior Art 1, which is described in, for example,Chapter 5 “File System” (p. 297˜p. 386) of “MINIX Operating System”(supervised by Bun Sakamoto, Apr. 21, 1989, ASKII). In the figure, 101denotes a processor for controlling the operation of the entireapparatus, 102 denotes a main memory as a working recording circuit forthe processor 101, 103 denotes a hard disk as a data recording circuit,104 denotes a file system for controlling data transfer between the mainmemory 102 and the hard disk 103 or between a video processing unit 105and the hard disk 103, and 105 denotes a video processing unit forterminating a video input and restoring a video output. Further, 11denotes a file management unit for executing the procedure to manage afile, 12-1 denotes an HDD cache as an internal buffer of the file system104, 12-2 denotes a recording data FIFO for holding recording data, 12-3denotes a reproduction data FIFO for holding reproduction data, 13denotes an HDD transfer control unit for executing data transfer, 15denotes a reception termination unit for converting a video input intoan internal recording format, and 16 denotes a decoder for creating avideo output from the data recorded on the hard disk 103. Further, thefile system 104 is a file system managed by an operating system of acomputer device 100, which is used as it is in the recording andreproduction apparatus.

In Prior Art 1, transfer of the ordinary data between the hard disk 103and the main memory 102, and transfer of the video data between the harddisk 103 and the video processing unit 105 are executed only through theHDD cache 12-1 which is a common internal buffer in the file system 104.

PRIOR ART 2

FIG. 3 is a block diagram illustrating a recording and reproductionapparatus according to Prior Art 2, which is disclosed in JapanesePublished Patent Application No. Hei. 9-319523. Hereinafter, Prior Art 2will be described with particular emphasis on a hard disk 103 and a filesystem 104 which are different from those of Prior Art 1. In FIG. 3, therecording and reproduction apparatus of Prior Art 2 comprises a firstfile system 104-1 for transferring ordinary data, and having arandom-accessible HDD cache 12-1 as an internal buffer; and a secondfile system 104-2 for transferring video data, and having a recordingdata FIFO 12-2 for holding recording data and a reproduction data FIFO12-3 for holding reproduction data. The hard disk 103 is managed as twoindependent areas, i.e., an ordinary data recording section 103-1 and avideo data recording section 103-2. Since the constituents with the samereference numerals as those of Prior Art 1 shown in FIG. 2 operate inthe same manner as described with respect to FIG. 2, repeateddescription is not necessary.

In Prior Art 2, access to the ordinary data recording section 103-1 ofthe hard disk 103 by the processor 101, and access to the video datarecording section 103-2 of the hard disk 103 by the video processingunit 105 are controlled independently from each other. That is, aninternal buffer to be used is fixed for each file type, and the HDDcache 12-1 is used for the data in the ordinary data recording section103-1, and the recording data FIFO 12-2 or the reproduction data FIFO12-3 is used for the data in the video data recording section 103-2.

PROBLEMS TO BE SOLVED BY THE INVENTION

In a recording and reproduction apparatus, when recording or reproducingordinary data in/from a hard disk, it is necessary to make burst andrandom access to data smaller than several kilobytes, and when recordingor reproducing video data in/from a hard disk, it is necessary to makecontinuous access at a transfer rate of several megabits/sec. In theconventional recording and reproduction apparatus, however, it isdifficult to reconcile the random access and the continuous access.

Hereinafter, the problems of Prior Art 1 and Prior Art 2 will bedescribed in detail.

PROBLEM OF PRIOR ART 1

In the recording and reproduction apparatus shown in FIG. 2, since theordinary data and the video data are transmitted through only the HDDcache 12 in the common file system 104, the transmission of the videodata is affected by the transmission of the ordinary data. Even when thehard disk 103 has sufficient data transmission ability, if the ratio ofthe ordinary data to the HDD cache 12 in the system file is increased,the hard disk 103 cannot transmit the video data at a predeterminedrate. Accordingly, in the file system 104 shown in FIG. 2, the largerthe data size becomes, the larger the access delay to the file system104 grows, leading to difficulty in securing continuity of recorded orreproduced video data.

PROBLEM OF PRIOR ART 2

On the other hand, the recording and reproduction apparatus shown inFIG. 3 has the two independent file systems 104-1 and 104-2 for theordinary data and the video data recorded on the hard disk 103,respectively, and fixedly uses the HDD cache 12-1 for reading andwriting the ordinary data, the recording data FIFO 12-2 for recordingthe video data, and the reproduction data FIFO 12-3 for reproducing thevideo data. Therefore, access to the ordinary data and access to thevideo data can be executed independently, whereby access delay to thefile system 104 is prevented, and continuous accessibility to the videodata to be recorded or reproduced is assured.

In the recording and reproduction apparatus shown in FIG. 3, however,the hard disk 103 is managed as two independent areas, i.e., theordinary data recording section 103-1 and the video data recordingsection 103-2. Therefore, the processor 101 cannot make random access tothe video data recording section 103-2 in the hard disk 103.

The random access to the video data by the processor 101 is required torealize the function of automatically creating a thumbnail image to arecorded program, the function of editing the image, or the like. In theconstruction shown in FIG. 3, however, it is impossible to automaticallycreate a thumbnail image to a recorded program or edit the image byrandom access of the processor 101 to the video data on the hard disk103.

The present invention is made to solve the above-mentioned problems andhas for its object to provide a recording and reproduction apparatusthat can realize high-speed and continuous access to video data forrecording and reproducing a digital video signal, and random access tovideo data for editing or the like.

SUMMARY OF THE INVENTION

A recording and reproduction apparatus according to a first aspect ofthe present invention is a recording and reproduction apparatuscomprising a hard disk for holding data, a file system for controllingrecording of data into the hard disk and reproduction of data from thehard disk, and plural processors for accessing the data in the harddisk, wherein the file system includes internal buffers for temporarilyholding the data transferred between the plural processors and the harddisk, for every access executed between the plural processors and thehard disk.

Therefore, the file system has an internal buffer for each of theaccesses executed by the respective processors, whereby that theaccesses from the plural processors share an internal buffer is avoided.So, even when there are plural kinds of accesses from the pluralprocessors to the hard disk, the continuity of the accesses can besecured, and another processor can make random access to a file wheredata has already been recorded or a file where data is being recorded.

Next, a recording and reproduction apparatus according to a secondaspect of the present invention is a recording and reproductionapparatus as defined in the first aspect, wherein each of the accessesexecuted between the plural processors and the hard disk is any ofsequential or random read access, write access, and read/write access.

Therefore, the file system has an internal buffer for each of theaccesses executed by the respective processors, whereby that theaccesses from the plural processors share an internal buffer is avoided.So, even when there are plural kinds of accesses from the pluralprocessors to the hard disk, the continuity of the accesses can besecured, and another processor can make random access to a file wheredata has already been recorded or a file where data is being recorded.

Next, a recording and reproduction apparatus according to a third aspectof the present invention is a recording and reproduction apparatus asdefined in the first aspect, wherein the processors are: a recordingunit for generating digital video to be recorded, and performingsequential write access to the hard disk; a reproduction unit forperforming sequential read access to the hard disk, and restoring thedigital video from the recorded data; and a processor for controllingthe entire recording and reproduction apparatus, and performing randomread/write access to the hard disk.

Therefore, the file system has an internal buffer for each of theaccesses executed by the recording unit, the reproduction unit, and theprocessor, whereby that the accesses from the recording unit, thereproduction unit, and the processor share an internal buffer isavoided. So, the access to ordinary data by the processor does notadversely affect the accesses to video data by the recording unit andthe reproduction unit, whereby the continuity of the accesses to thevideo data is secured, and the processor can make random access to afile where video data has already been recorded or a file where videodata is being recorded.

Next, a recording and reproduction apparatus according to a fourthaspect of the present invention is a recording and reproductionapparatus as defined in any of the first to third aspects of the presentinvention, wherein the file system includes a selector for selecting aninternal buffer to be used for each access, in advance of use of thehard disk.

Therefore, the file system can select an internal buffer that isprovided for each of the accesses executed by the respective processors,whereby that the accesses from the plural processors share an internalbuffer is avoided. So, even when there are plural kinds of accesses fromthe plural processors to the hard disk, the continuity of the accessescan be secured. Further, since an internal buffer to be used is notfixed for each file, but is selected in advance of use of the hard disk,another processor can make random access to a file where data hasalready been recorded or a file where data is being recorded.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a recording and reproduction apparatusaccording to a first embodiment of the present invention.

FIG. 2 is a block diagram of a recording and reproduction apparatusaccording to Prior Art 1.

FIG. 3 is a block diagram of a recording and reproduction apparatusaccording to Prior Art 2.

FIG. 4 is a diagram illustrating a data structure for managing a file ofthe recording and reproduction apparatus according to the firstembodiment of the invention.

FIG. 5 is a diagram illustrating a command format from a processor ofthe recording and reproduction apparatus according to the firstembodiment of the invention.

FIG. 6 is a flowchart illustrating an OPEN process of the recording andreproduction apparatus according to the first embodiment of theinvention.

FIG. 7 is a flowchart illustrating a WRITE process of the recording andreproduction apparatus according to the first embodiment of theinvention.

FIG. 8 is a flowchart illustrating a CLOSE process of the recording andreproduction apparatus according to the first embodiment of theinvention.

FIG. 9 is a flowchart illustrating the READ process of the recording andreproduction apparatus according to the first embodiment of theinvention.

DETAILED DESCRIPTION OF THE INVENTION Embodiment 1

Hereinafter, a recording and reproduction apparatus according to a firstembodiment of the present invention will be described with reference tothe drawings.

FIG. 1 is a block diagram illustrating a recording and reproductionapparatus according to the first embodiment of the invention. In thefigure, 101 denotes a processor for controlling the operation of theentire apparatus through a system bus 1, and performing randomread/write access to a hard disk 103; 102 denotes a main memory as aworking recording circuit for the processor 101; 103 denotes a hard diskfor holding video data and the like, as a data recording circuit; 104denotes a file system for managing a series of data on the hard disk 103as a random-accessible data sequence, and controlling data transmissionbetween the main memory 102 and the hard disk 103 or between a videoprocessing unit 105 and the hard disk 103; and 105 denotes a videoprocessing unit for processing input/output video data. Further, thevideo processing unit 105 comprises a reception termination unit 15, asa recording unit, for converting a video input into an internalrecording format, and performing successive write access to the harddisk 103; and a decoder 16, as a reproduction unit, for performingsuccessive read access to the hard disk 103, and creating a video outputfrom the recorded data.

Next, a description will be given of the construction of the system file104, which is a feature of the present invention.

The file system 104 comprises a file management unit 11 for executingthe procedure for file management; an internal buffer 12 as a temporarystorage area for data that is read from or written in the hard disk 103;an HDD transmission control unit 13 for executing data transmissionbetween the internal buffer 12 and the hard disk 103; a selector 14 forselecting a buffer to be connected, for every type of access; and acontrol bus 2 connecting the respective constituents of the file system104.

The internal buffer has independent buffer areas corresponding to thekinds of accesses to the hard disk 103, i.e., an HDD cache 12-1 forrandom access by the processor 101, a recording data FIFO 12-2 forrecording data from the reception termination unit 15, and areproduction data FIFO 12-3 for reproduction data to the decoder 16. Therespective buffer areas have the characteristics as follows.

The HDD cache 12-1 holds a block of higher access frequency for longertime. Accordingly, even when the processor 101 makes random access tothe hard disk 103, the probability of existence of the subject data inthe HDD cache 12-1 becomes high, whereby the number of access times tothe hard disk is reduced to improve the transmission efficiency.

On the other hand, the recording data FIFO 12-2 retains the video datafrom the reception termination unit 15 in the first-in first-out order,and the reproduction data FIFO 12-3 retains the input data to thedecoder 16 in the first-in first-out order.

Next, a description will be given of the method for managing the data inthe hard disk 103 by the file management unit 11 in the file system 104.

The file management unit 11 in the file system 104 manages a series ofdata on the hard disk 103 as a data sequence that is randomly accessiblein byte units and is called a file, and controls data transmissionbetween the main memory 101 and the hard disk 103 or between the videoprocessing unit 105 and the hard disk 103.

Hereinafter, a description will be given of a file management systemcalled “an i-node system” which is described in “Design and Mounting ofUNIX4.3BSD” (translated by Akira Nakamura et al., Jun. 30, 1991,published by Maruzen), as an example of a file management system by thefile management unit 11.

FIG. 4 is a diagram illustrating a data structure for managing a file onthe hard disk 103 by the i node system. As shown in FIG. 4, five kindsof blocks, i.e., file information 42, directory information 43, anindirect designation block 44, a data block 45, and a bit map 46, arepresent on the hard disk 103.

The file information 42 is a block existing singly in each file, and thefile information 42 has a file size 42-1 indicating the size of the filein byte units, and a block list 42-2 indicating the block numbers ofdata blocks 45 where the data of the file are actually stored.

The directory information 43 has a file name 43-1, and a fileinformation number 43-2 as an index of the corresponding fileinformation 42, and associates the file name with the file information42.

Further, in the indirect designation block 44, the block numbers of thedata blocks 45, where the data of the file are stored, are sequentiallyrecorded, and the data to be recorded as the file are stored in therespective data blocks 45.

Further, each bit on the bit map 46 is associated with one block tomanage the block, and unused blocks on the hard disk 103 are managed bysetting the bit at 0 when the corresponding block is unused, and settingthe bit at 1 when the corresponding block is used.

Further, the file management unit 11 of the file system 104 for managingthe data in the hard disk 103, has a table called a file description 41to control access to the file. The file description 41 has a fileinformation number 41-1 indicating the file information 42 of a file toaccess, a file pointer 41-2 indicating a file position for read/write,and a use internal buffer 41-3 indicating an internal buffer 12 to beused when accessing the file.

Since the file description 41 exists for every access to the file, theremay be cases where plural file descriptions 41 exist for one file. Forexample, when executing recording and reproduction of video at the sametime, input video data is written in a file and, simultaneously, videodata to be reproduced is read from the same file. At this time, a filedescription for write access and a file description for read accessexist corresponding to one file.

In this way, the file management unit 11 in the file system 104 has thefile description 41 that exists for each access to the file, and managesa series of data on the hard disk 103 as a random-accessible datasequence.

While in this first embodiment the i-node system is described as a filemanagement system, the present invention is applicable to the case ofmanaging a file using a file allocation table (FAT) that is employed inthe operating system of Windows or the like.

Next, a description will be given of control of access to the hard disk103 by the file system 104, with reference to FIGS. 5 through 9.

The file system 104 controls access to the hard disk 103, on the basisof a command from the processor 101 to the file system 104. FIG. 5 showsthe format of the command from the processor 101 according to the firstembodiment of the invention.

In FIG. 5, an OPEN command 510 is a command for notifying the filesystem 104 of an access method or the like in advance of use of a file.The OPEN command 510 indicates a file name 511 to access as a firstargument, an access mode 512 such as read/write as a second argument,and a use internal buffer 513 as a third argument. On receipt of theOPEN command 510 from the processor 101, the file system 104 creates afile description 41 as shown in FIG. 4, and returns, as a return value,a file descriptor 514 as an index indicating the file description 41.

A READ command 520 is a command for making read access to the alreadyopened file. When the file descriptor 514 indicating a file as a readtarget, a destination address 522 on the main memory 102 where the readfile data is stored, and a size 523 indicating the number of bytes to beread are given to the file system 104 as the first, second, and thirdarguments, respectively, the file system 104 returns, as a return value,a transfer size 524 indicating the number of bytes actually read.

A WRITE command 530 is a command for making write access to the alreadyopened file. When the file descriptor 514 indicating a file as a writetarget, the destination address 532 on the main memory 102 where thedata to be written is stored, and a size 533 indicating the number ofbytes to be written are given to the file system 104 as the first,second, and third arguments, respectively, the file system 104 returns,as a return value, the transfer size 534 indicating the number of bytesactually written.

Read/write to the file are executed on the file position indicated bythe file pointer 41-2 in the file description 41 shown in FIG. 4. Thefile pointer 41-2 is initialized to zero when opening the file, and isincremented at every read/write access, by the size of the access.

A LSEEK command 540 is a command for moving the file pointer 41-2 of thealready opened file to a designated position, and this command enablesrandom access to the file. When the file descriptor 514 indicating afile whose file pointer is to be updated, and a new file pointer value542 are given to the file system 104 as the first and second arguments,respectively, the file system 104 returns, as a return value, an updatedfile pointer value 544.

A CLOSE command 550 is used to notify the file system 104 of the file onwhich access has ended, and it releases the file description 41indicated by the file descriptor 514 as the first argument.

Hereinafter, the process contents of the respective commands will bedescribed in more detail. In the following description, the fileinformation 42, the directory information 43, and the like are those inthe file management data structure shown in FIG. 4.

FIG. 6 is a flowchart illustrating the OPEN process. In this process,the file having the file name 511 indicated by the first argument in theOPEN command 510 shown in FIG. 5 is opened in the open mode 512indicated by the second argument, and initialization for making accessis performed using the use internal buffer 513 indicated by the thirdargument.

In the OPEN command process, initially, it is checked whether the openmode is CREATE or not (step 601). When CREATE is possible, the file size42-1 in the file information 42 is initialized to zero, and the blocklist 42-2 is initialized to NULL, thereby creating new file information42 (step 602).

Thereafter, the first argument 511 is set in the file name 43-1 in thedirectory entry 43-3, and the number of the created file information 42is set in the file information number 43-2, whereby the newly createdfile information 42 is entered in the directory 43 (step 603).

When it is decided in step 601 that the open mode is not CREATE, thedirectory 43 is searched for a directory entry 43-3 whose file name 43-1is identical to the first argument 511, and the file information 42indicated by the file information number 43-2 in the selected directoryentry 43-3 is obtained to identify the target file information from theexisting file information 42 (step 604).

After the file information 42 is obtained in step 602 or step 604, thenumber of the file information 42 is set in the file information number41-1, the file pointer 41-2 is initialized to zero, and the value of thethird argument 513 is set in the use internal buffer 41-3, therebycreating the file description 41 (step 605). Thereafter, the filedescriptor 514 corresponding to the created file description 41 is setin the result of execution (step 606) to end the process.

In the present invention, as shown in step 605, in the file description41 that exists for every access to a file, the number of obtained fileinformation 42 is set in the file information number 41-1, the filepointer 41-2 is initialized to zero, and the value of the third argument513 is set in the use internal buffer 41-3. Therefore, even when pluralaccesses are made to the same file, the internal buffer to be used canbe designated for each access by the OPEN command. That is, in thepresent invention, even when plural accesses are made to the same file,the internal buffer 12 to be used can be changed for each access. Forexample, when recording video data on a file, the recording data FIFO12-2 is used as the internal buffer 12, and when editing the video datain the file simultaneously with the recording, the HDD cache 12-1 can beused as the internal buffer 12 simultaneously with the recording dataFIFO 12-2.

FIG. 7 is a flowchart illustrating the WRITE process. In this process,using the access method indicated by the file descriptor 514 that is thefirst argument in the WRITE command 530, the data equivalent to thetransfer size 533 indicated by the third argument is written from thesource address 532 indicated by the second argument to the hard disk103.

In the WRITE process, initially, the file description indicated by thefirst argument 514 is obtained (step 701), and the file information 42indicated by the file information number 41-1 in the file description 41is obtained (step 702). Next, it is checked whether a data block 45 as awrite target, which is indicated by the file pointer 41-2, exists or not(step 703), and when no data block 45 as a write target exists, a newdata block 45 is obtained (step 704).

Thereafter, the WRITE process is divided into branch processes asfollows: the process by the HDD cache 12-1 that is the internal buffer12 indicated by the use internal buffer 41-3 in the obtained filedescription 41 (step 705), and the process by the recording data FIFO12-2 (step 709).

When the use internal buffer 41-3 is the HDD cache 12-1, the HDD cache12-1 is searched for a data block 45 as a write target (step 706). Whenthere is no target block as a write target, a data block is obtainedfrom a new cache (step 707). Thereafter, the data equivalent to the sizeindicated by the third argument 533 is written in this cache from theaddress on the main memory indicated by the second argument 532 (step708).

When the use internal buffer 41-3 is the recording data FIFO 12-2, thedata equivalent to the size indicated by the third argument 533 from thehead data in the recording data FIFO 12-2 is written in the hard disk103 (step 710). At this time, the actual writing into the hard disk 103is executed by the HDD transfer controller 13 on the basis of aninstruction from the file management unit 11.

In the WRITE process, only transfer of data on the main memory 101 tothe data block of the cache is executed, and data transfer from the datablock of the cache to the hard disk 103 is executed in the CLOSE processwhich will be described later. Thereby, unnecessary write access to thehard disk 103 is avoided, and the write access efficiency is improved.

When step 708 or step 710 is completed, the file pointer 41-2 in thefile description 41 is incremented by the size of the written data (step711), and the size of the written data is set in the result of execution(step 712) to end the process.

FIG. 8 is a flowchart illustrating the CLOSE process. In this process,the file description 41 indicated by the first argument 514 in the CLOSEcommand 550 is released. In the CLOSE process, initially, the filedescription 41 indicated by the first argument 514 is obtained (step801), and the file information 42 indicated by the file informationnumber 41-1 in the file description 41 is obtained (step 802).

Next, it is checked whether the use internal buffer 41-3 indicated inthe file description 41 is the HDD cache 12-1 or not (step 803). When itis the HDD cache 12-1, it is checked whether or not the data block ofthe cache which is written in the step 708 of the WRITE process existsin the HDD cache 12-1 or not (step 804). When such data block exists,the data block of the already written cache is written in the hard disk103 (step 805), and the data block of the cache is released (step 806).Steps 804, 805, and 806 are continued until the data blocks of thealready written cache are gone.

When the use internal buffer 41-3 is not the HDD cache 12-1 or when thedata blocks of the already written cache are gone, the file description41 is released (step 807) to end the process.

FIG. 9 is a flowchart illustrating the READ process. In this process,using the access method indicated by the file identifier 514 as thefirst argument in the READ command 520, the data equivalent to thetransfer size 523 indicated by the third argument is read from the harddisk 103 to the destination address 522 indicated by the secondargument.

In the READ process, initially, the file description indicated by thefirst argument 514 is obtained (step 901), and the file information 42indicated by the file information number 41-1 in the file description 41is obtained (step 902). Next, the READ process is divided into thefollowing branch processes: the process by the HDD cache 12-1 that isthe internal buffer 12 indicated by the use internal buffer 41-3 in theobtained file description 41 (step 903), and the process by thereproduction data FIFO 12-3 (step 908).

When the internal buffer is the HDD cache 12-1, it is checked whetherthe data block 45 as a read target exists in the HDD cache 12-1 or not(step 904). When no read target block exists, a data block of a newcache is obtained (step 905), and the data block 45 on the hard disk 103is read in the data block of this cache (step 906). Thereafter, the datain the data block in this cache is read to the address on the mainmemory 102 indicated by the second argument 522 by the size designatedby the third argument 523 (step 907). When a read target block exists inthe HDD cache 12-1 in step 904, access to the hard disk 103 (steps 905and 906) becomes unnecessary, and only read access to the data block ofthe corresponding cache (step 907) is carried out, resulting inhigh-speed reading.

When the internal buffer 12 is the reproduction data FIFO 12-3, the dataequivalent to the size designated by the third argument 523 is read fromthe data on the hard disk 103 indicated by the file pointer 41-2, to theend part of the reproduction data FIFO 12-3 (step 909). At this time,actual reading from the hard disk 103 is executed by the HDD transfercontrol unit 13 on the basis of an instruction from the file managementunit 11.

When the data reading in step 907 or step 909 is ended, the file pointer41-2 is incremented by the size of the read data (step 910), and thesize of the read data is set in the result of execution (step 911) toend the process.

Next, the LSEEK process will be described. In this process, with respectto the file indicated by the file descriptor 514 as the first argumentin the LSEEK command, the access position to the file (i.e., the valueof the file pointer 41-2) is set in the file pointer value 542 indicatedby the second argument.

In the LSEEK process, initially, the file description indicated by thefirst argument 514 is obtained, the value indicated by the secondargument 542 is set in the file pointer 41-2 in the file description 41,and the updated file pointer value is set in the result of execution toend the process.

Although, in the first embodiment shown in FIG. 1, the file system 104is implemented as one functional block, the present invention is alsoapplicable to the case where the file system 104 is implemented assoftware on the processor 101.

As described above, in the present invention, an independent buffer areais provided for each type of access to the hard disk 103, and eachbuffer is used for the corresponding access. Therefore, the access bythe processor 101 and the access by the video processing unit 105 areperformed without sharing an internal buffer, whereby continuity ofaccesses to video data can be secured.

Further, since the internal buffer to be used is not fixed for eachfile, but specified for each access to the file by the processor 101,the processor 101 can randomly access a file in which video data hasalready been recorded or a file in which video data is being recorded.

Although, in the recording and reproduction apparatus according to thefirst embodiment of the invention, the processing units that process thedata on the hard disk 103 are the processor 101, the receptiontermination unit 15 as a recording unit, and the decoder 16 as thereproduction unit, the processing units are not restricted to these, andthe present invention can also be applied to other processing units thataccess the hard disk.

Further, in the recording and reproduction apparatus according to thefirst embodiment of the invention, the processor 101 performs randomaccess in the read/write mode to the hard disk 103, the receptiontermination unit 15 as the recording unit performs sequential access inthe write mode to the hard disk 103, and the decoder 16 as thereproduction unit performs sequential access in the read mode to thehard disk 103, and the recording and reproduction apparatus has aninternal buffer for each of these accesses. However, the presentinvention is not restricted thereto, and the recording and reproductionapparatus may have an internal buffer for each access from a processingunit. For example, the apparatus may have an internal buffer for each ofsequential read access, write access, and read/write access, which areexecuted by a single processing unit.

APPLICABILITY IN INDUSTRY

As described above, according to a recording and reproduction apparatusof the present invention, an independent internal buffer area isprovided for each of plural kinds of accesses to a hard disk, and eachinternal buffer is used for the corresponding access, whereby thataccess by the processor and access by the video processing unit share aninternal buffer is avoided. Therefore, the access to ordinary data doesnot adversely affect the access to video data, whereby the continuity ofthe accesses to video data is ensured. Further, an internal buffer to beused is not fixed for each file, but specified for each access to afile, whereby the processor can randomly access a file in which videodata has already been recorded or a file in which video data is beingrecorded.

According to the present invention, the continuity of the accesses tothe hard disk for recording and reproduction can be secured, and theprocessor can randomly access already recorded video data during datarecording.

1. A recording and reproduction apparatus comprising: a hard disk forholding data; a file system for controlling recording of data into thehard disk and reproduction of data from the hard disk; and a pluralityof processors for performing accesses to the data in the hard disk,wherein the file system includes a plurality of internal buffers fortemporarily holding data transferred between the plurality of processorsand the hard disk, the plurality of internal buffers being forrespective kinds of accesses to a same file executed at a same timebetween the plurality of processors and the hard disk, the plurality ofinternal buffers includes a buffer for random access, a buffer forrecording, and a buffer for reproduction, and the buffer for randomaccess is operable to be accessed in random order simultaneously withone of the buffer for recording and the buffer for reproduction, both ofwhich are operable to be accessed in sequential order, when differentkinds of accesses to the same file are performed.
 2. A recording andreproduction apparatus as defined in claim 1, wherein each of theaccesses executed between the plurality of processors and the hard diskis one of a sequential read access, a random read access, a writeaccess, and a read/write access.
 3. A recording and reproductionapparatus as defined in claim 1, wherein the processors include: arecording unit for generating digital video to be recorded, andperforming sequential write access to the hard disk; a reproduction unitfor performing sequential read access to the hard disk, and restoringdigital video from recorded data; and a processor for controlling theentire recording and reproduction apparatus, and performing randomread/write access to the hard disk.
 4. A recording and reproductionapparatus as defined in claim 1, wherein the file system includes aselector for selecting an internal buffer of the plurality of internalbuffers to be used for every kind of access, in advance of use of thehard disk.
 5. A recording and reproduction apparatus as defined in claim2, wherein the file system includes a selector for selecting an internalbuffer of the plurality of internal buffers to be used for every kind ofaccess, in advance of use of the hard disk.
 6. A recording andreproduction apparatus as defined in claim 3, wherein the file systemincludes a selector for selecting an internal buffer of the plurality ofinternal buffers to be used for every kind of access, in advance of useof the hard disk.